define(function(require, exports, module) { 
	"require:nomunge,exports:nomunge,module:nomunge";
	"use strict";
    var self = exports;
    var utils = require('mokit/utils');
    var service = require('./service');
    var user = require("./User");

	self.imgPath = user.serviceUri + "sypro";
	self.args = {
		id: 0,
		userId: user.state.userId
	};
	self.list = [];

	//获取项目成员列表
	self.getList = function(projectId, callback){
		self.args.id = projectId;
        service.ucenter.project.member.getList(this.args, function(rs, err) {
            if (err && callback) return callback(err.message || err);
            if (rs.success) {
               	self.list = rs.obj;
                if (callback) callback();
            } else {
                rs = rs || {};
                var msg = rs.msg || 'unknow error';
                if (callback) callback(msg);
            }
        });
	};
	
	//邀请成员
	self.inviteMember = function(userId, callback){
        service.ucenter.project.inviteMember({id:userId}, function(rs, err) {
            if (err && callback) return callback(err.message || err);
            if (rs.success) {
                if (callback) callback();
            } else {
                rs = rs || {};
                var msg = rs.msg || 'unknow error';
                if (callback) callback(msg);
            }
        });
	};	
	
	
});